
package com.diy.sigmund.diycommon.designpatterns.state;

/**
 * @author ylm-sigmund
 * @since 2022/2/15 17:50
 */
public class SoldOutState implements State {

    GumballMachine gumballMachine;

    public SoldOutState(GumballMachine gumballMachine) {
        this.gumballMachine = gumballMachine;
    }

    @Override
    public void insertQuarterState() {
        System.out.println("糖果售罄");
    }

    @Override
    public void ejectQuarterState() {
        System.out.println("你还没有投入25分钱");
    }

    @Override
    public void turnCrank() {
        System.out.println("糖果全部售完");
    }

    @Override
    public void dispense() {
        System.out.println("没有糖果可以发放");
    }
}
